package threadpool;

/**
 * 带有优先级的Runnable类型
 */
public class PriorityRunnable implements Runnable {

    public Priority priority;//任务优先级
    private Runnable runnable;//任务真正执行者
    /*package*/ long SEQ;//任务唯一标示

    public PriorityRunnable(Priority priority, Runnable runnable) {
        this.priority = priority == null ? Priority.NORMAL : priority;
        this.runnable = runnable;
    }


    @Override
    public void run() {
        this.runnable.run();

    }
}
